.CSS_START_components_tags {
  display: none;
}

.tags_wrapper {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  justify-content: flex-start;
}

.tag {
  display: flex;
  align-items: center;
  background-color: var(--color-brand-secondary);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--color-brand-primary);
  color: var(--color-brand-primary)!important;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  margin-right: 10px;
  margin-bottom: 5px;


  &:has(a:focus) {
    outline: var(--color-brand-primary) solid 2px !important;
    outline-offset: -2px;
  }


  a {
    display: flex;
    align-items: center;
    text-decoration: none!important;
    color: var(--color-brand-primary)!important;
    word-break: break-all;
    white-space: normal;


    &:visited {
      color: var(--color-brand-primary);
    }
  }

  &:has(button[data-state="open"]) {
    background-color: var(--color-gray-300);
    border: 1px solid var(--color-text-primary);
    color: var(--color-text-primary);

    a {
      color: black!important;
    }

    &:hover {
      background-color: var(--color-gray-300);
    }

    svg {
      color: var(--color-text-primary);
    }
  }

  & svg {
    fill: var(--color-brand-primary);
    color: var(--color-brand-primary);
  }

  &:hover {
    background-color: var(--color-neutral-base);
  }

  &.no_hover:hover {
    background-color: var(--color-neutral-base);
    cursor: default;
  }

  & button {
    width: 11px;
    height: 11px;
    margin: 0 0 0 5px;

    &:hover svg {
      color: var(--color-text-primary);
    }
  }

  &_inputs {
    position: relative;
    max-width: 300px;
    flex: 1;
    border-radius: 0;
    border: none;
    height: 35px;
    background-color: transparent;
    color: var(--color-text-primary);
    border-bottom: 1px solid #c1c1c1;
  
    &::placeholder {
      font-weight: 300;
      color: #c1c1c1;
    }
  }
}

.Popover_delete_tag {
  z-index: 1000;
  border: 1px solid var(--color-brand-primary);
  background-color: var(--color-brand-secondary);
  border-radius: 5px;
  transition: 200ms;

  button {
    padding: 5px;
    color: var(--color-brand-primary);
    height: unset;
    border-radius: 5px;

    &:hover {
      background-color: var(--color-neutral-base);
    }

    &:focus {
      background-color: var(--color-brand-primary);
      border: 1px solid var(--color-neutral-base);
      outline: 1px solid var(--color-brand-primary);
      color: var(--color-neutral-base);
    }

    svg {
      width: 10px;
    }
  }
}


.allPub_tagsTrigger {
  width: fit-content;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 6px;
  padding: 5px;

  svg {
    width: 24px;
    color: var(--color-brand-primary);
    fill: var(--color-brand-primary);
  }
}

.Popover_filter_container {
  background-color: var(--color-neutral-base);
  border-radius: 6px;
  border: 1px solid var(--color-gray-400);
  box-shadow: 0 3px 10px 5px var(--color-gray-400);
  padding: 20px 0 0;
  overflow: scroll;
  max-height: 50dvh;
  width: fit-content;

  > div {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    gap: 5px 10px 0;
    width: 100%;
    padding: 10px 0 0;

    .tag_item {
      font-size: 14px;
      border-bottom: 1px solid var(--color-gray-400);
      width: 100%;
      padding: 5px 10px 5px 5px;
      margin: 0;

      &:hover {
        cursor: pointer;
        background-color: var(--color-brand-secondary);
      }
    }
  }

  .resetFilter {
    margin: auto;

    svg {
      width: 20px;
      color: var(--color-brand-primary);
      fill: var(--color-brand-primary);
    }

    &:hover svg {
      color: var(--color-error-text);
      fill: var(--color-error-text);
    }
  }
}

.CSS_END_components_tags {
  display: none;
}
